﻿#region Using Statements
using System;
#endregion

namespace DirectZZT.Shared.Input
{
    /// <summary>
    /// Represents a single input binding.
    /// </summary>
    public sealed class InputBinding : IEquatable<InputBinding>
    {
        /// <summary>
        /// Gets/sets the bound action.
        /// </summary>
        public string Action { get; set; }
        /// <summary>
        /// Gets/sets the bound code for this action.
        /// </summary>
        public int Code { get; set; }

        #region IEquatable<InputBinding> Members

        /// <summary>
        /// Returns whether or not the two instances are the same.
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public bool Equals(InputBinding other)
        {
            return string.Equals(Action, other.Action, StringComparison.InvariantCultureIgnoreCase);
        }

        #endregion
    }
}
